export const AUTH_KEY = "authorization";

export function registerExtraComponents(registry: any) {
  // 基于 authorization 的安全方案
  registry.registerComponent("securitySchemes", "authorization", {
    type: "apiKey",
    name: "authorization",
    in: "header",
  });
  // 注册基于 Cookie 的安全方案
  registry.registerComponent("securitySchemes", "cookieAuth", {
    type: "apiKey",
    name: "token", // Cookie 名称
    in: "cookie", // 指定在 Cookie 中
  });
  registry.registerComponent("schemas", "ExtraSchemasA", {
    type: "object",
    properties: {
      id: {
        type: "string",
      },
    },
  });
}
